const a = function (...args) {
  const [{ dayjs, dc, xe }] = args.slice(-1);
  const { http, store } = dc;
  const { mapTree, toArrayTree } = xe;
  const YEAR = dayjs(store.get('user', 'date')).format('YYYY');
  return {
    api: async () => {
      return mapTree(
        toArrayTree(
          await http.form({
            url: '/lpzw/czItem/listItemCombo',
            data: { OPERATORGUID: 1, type: 0, YEAR },
          }),
          { parentKey: 'pid' },
        ),
        (item) => ({ ...item, disabled: item.children && item.children.length > 0 }),
      );
    },
    labelField: 'text',
    valueField: 'id',
    immediate: true,
    showSearch: true,
    treeNodeFilterProp: 'text',
  };
}